#include "acml.h"
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#define maxof2(X,Y) (((Y)>(X))?(Y):(X))


typedef struct{

	char registry[35];

	// dimensions
	int m,n;

	//Starting points
	double* x0;
	double c0;
	int init;

	// Termination
	int maxIter;
	double tol;
	int tFlag;

	//Normalization
	int nFlag;
	double* mu;
	double* nu;

	//Method
	int method;
	int lFlag;

	//Regularization
	int rFlag;
	double rsL2;

	//Group and others
	int* ind;
	int q;
	// 3 more to come

}OPTS;

void initOPTS(OPTS *opt,int m,int n,int k);
void setOPTx0(OPTS *opt,double* x0);
void setOPTc0(OPTS *opt,double c0);
void setOPTmu(OPTS *opt,double* mu);
void setOPTnu(OPTS *opt,double* nu);
int hasGot(OPTS *opt,char * field);

void initNormalization(OPTS *opt,double *A);